﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YJTTool.CustomerInfo.Model
{
    public class TelematicsDto : INotifyPropertyChanged
    {
        private int _id;
        private string _storesName;
        private string _storesCode;
        private string _dataBaseName;
        private string _dataBasePwd;
        private string _telematicsName;
        private string _telematicsAccount;
        private string _telematicsPwd;
        private string _createPeople;
        private string _dataBaseType;
        private string _iPAddress;
        private string _serverAccount;
        private string _serverPwd;
        private string _midAPPID;
        private string _midKey;
        private DateTime _addDate;
            

        public int Id
        {
            get => _id;
            set
            {
                if (_id != value)
                {
                    _id = value;
                    OnPropertyChanged(nameof(Id));
                }
            }
        }

        public string StoresName
        {
            get => _storesName;
            set
            {
                if (_storesName != value)
                {
                    _storesName = value;
                    OnPropertyChanged(nameof(StoresName));
                }
            }
        }

        public string StoresCode
        {
            get => _storesCode;
            set
            {
                if (_storesCode != value)
                {
                    _storesCode = value;
                    OnPropertyChanged(nameof(StoresCode));
                }
            }
        }

        public string DataBaseName
        {
            get => _dataBaseName;
            set
            {
                if (_dataBaseName != value)
                {
                    _dataBaseName = value;
                    OnPropertyChanged(nameof(DataBaseName));
                }
            }
        }

        public string DataBasePwd
        {
            get => _dataBasePwd;
            set
            {
                if (_dataBasePwd != value)
                {
                    _dataBasePwd = value;
                    OnPropertyChanged(nameof(DataBasePwd));
                }
            }
        }

        public string TelematicsName
        {
            get => _telematicsName;
            set
            {
                if (_telematicsName != value)
                {
                    _telematicsName = value;
                    OnPropertyChanged(nameof(TelematicsName));
                }
            }
        }

        public string TelematicsAccount
        {
            get => _telematicsAccount;
            set
            {
                if (_telematicsAccount != value)
                {
                    _telematicsAccount = value;
                    OnPropertyChanged(nameof(TelematicsAccount));
                }
            }
        }

        public string TelematicsPwd
        {
            get => _telematicsPwd;
            set
            {
                if (_telematicsPwd != value)
                {
                    _telematicsPwd = value;
                    OnPropertyChanged(nameof(TelematicsPwd));
                }
            }
        }

        public string CreatePeople
        {
            get => _createPeople;
            set
            {
                if (_createPeople != value)
                {
                    _createPeople = value;
                    OnPropertyChanged(nameof(CreatePeople));
                }
            }
        }

        public string DataBaseType
        {
            get => _dataBaseType;
            set
            {
                if (_dataBaseType != value)
                {
                    _dataBaseType = value;
                    OnPropertyChanged(nameof(DataBaseType));
                }
            }
        }

        public string IPAddress
        {
            get => _iPAddress;
            set
            {
                if (_iPAddress != value)
                {
                    _iPAddress = value;
                    OnPropertyChanged(nameof(IPAddress));
                }
            }
        }

        public string ServerAccount
        {
            get => _serverAccount;
            set
            {
                if (_serverAccount != value)
                {
                    _serverAccount = value;
                    OnPropertyChanged(nameof(ServerAccount));
                }
            }
        }

        public string ServerPwd
        {
            get => _serverPwd;
            set
            {
                if (_serverPwd != value)
                {
                    _serverPwd = value;
                    OnPropertyChanged(nameof(ServerPwd));
                }
            }
        }
        public string MidAPPID
        {
            get => _midAPPID;
            set
            {
                if (_midAPPID != value)
                {
                    _midAPPID = value;
                    OnPropertyChanged(nameof(MidAPPID));
                }
            }
        }

        public string MidKey
        {
            get => _midKey;
            set
            {
                if (_midKey != value)
                {
                    _midKey = value;
                    OnPropertyChanged(nameof(MidKey));
                }
            }
        }
        public DateTime AddDate
        {
            get => _addDate;
            set
            {
                if (_addDate != value)
                {
                    _addDate = value;
                    OnPropertyChanged(nameof(AddDate));
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
